<?PHP
	// *******************************************************************************************
	// @Namespace : Colibri.Web.UI
	// @Description : Define a label control.
	// @Author : Ronald Guillen
	// *******************************************************************************************
	
	Framework::Import("Colibri.Web.UI.WebControl");
	
	class Label extends WebControl
	{
		// [Event] WebControl.OnPostBack()
		function OnPostBack()
		{
			$this->Text = (isset($_POST[$this->Name])) ? $_POST[$this->Name] : NULL;
		}
		
		function ToHtml()
		{
			$htmlCode = "<span id=\"".$this->Name."\"";
			if($this->getProperty('CssClass') != NULL)
			{
				$htmlCode .= " class=\"".$this->getProperty('CssClass')."\"";
			}
			$htmlCode .= ">".$this->Text."</span>\n";
			
			print $htmlCode;
		}
	}
?>